In a welding robot, the welding position of a tool that welds two parts together is set so that the tool will not interfere with the parts or a peripheral device, etc. In a known type of technology, a user sets a target angle and an advance angle representing a desired welding position of a tool, and then angles that are the same as or close to the target angle and advance angle desired by the user are automatically set within a range where interference does not occur between parts and a welding robot, etc. by using shape data or the like of the parts, the welding robot, etc., whereby a welding position of the tool is provided (e.g., see Japanese Unexamined Patent Application, Publication No. 2000-94131).